export default function requireConfig() {
    if (3 > 1) {
        console.log('8888')
    }
    var data = {
        auth_url: encodeURI(window.location.href),

    }
    // this.$http
    //     .get("/getJsConfig")
    //     .then(response => {
    //         console.log(response.data)
    //     })

    "/" + getJsConfig.WeChatAuthorzation(data)
        .then(res => {
            console.log('0000');
            console.log(res.data);
            if (code == 0) {
                wx.config({
                    debug: false,
                    appId: res.data.appId,
                    timestamp: parseInt(res.data.timestamp),
                    nonceStr: res.data.nonceStr,
                    signature: res.data.signature,
                    jsApiList: ["onMenuShareTimeline", "onMenuShareAppMessage"]
                })
            }

        })
        .catch(error => {
            console.log(error)
        })
}